<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <!--注意，一个是方法，一个是属性-->
    <p>调用当前时间的方法：{{currentTime1()}}</p>
    <p>当前时间的计算属性：{{currentTime2}}</p>
</div>
</body>

<script src="vue.js"></script>

<script>
    var vue = new Vue({
        el: '#app', data: {
            message: 'Hello Vue'
        }, methods: {
            currentTime1: function () {
                return Date.now();
            }
        }, computed: {
            currentTime2: function () {
                this.message;
                return Date.now();
            }
        }
    })
</script>
</html>